import { action, computed, observable } from "mobx";

export default class AppModel {
  constructor(start?: number) {
    if (start) {
      this.age = start;
    }
  }

  @observable age = 10;
  @observable users = [];

  @computed get computedAge() {
    return this.age + 1;
  }

  @action setAge() {
    this.age++;
  }
}
